
package ConversorBase;


public class ConversorHexadecimal {
   private String numBin;
    private String numHex;
    private String numOct;
    private int numDec;

    public ConversorHexadecimal(){}
    
    public String converteBinario(){
        numDec = Integer.parseInt(numBin, 2);
        numHex = Integer.toString(numDec, 16);        
        return numHex;
    }
    
    public String converteOctal(){
        numDec = Integer.parseInt(numOct, 8);
        numHex = Integer.toString(numDec, 16);
        return numHex;
    }
    
    public String converteDecimal(){
        numHex = Integer.toString(numDec, 16);
        return numHex;
    }
    
    
    
    /**
     * @return the numBin
     */
    public String getNumBin() {
        return numBin;
    }

    /**
     * @param numBin the numBin to set
     */
    public void setNumBin(String numBin) {
        this.numBin = numBin;
    }

    /**
     * @return the numHex
     */
    public String getNumHex() {
        return numHex;
    }

    /**
     * @param numHex the numHex to set
     */
    public void setNumHex(String numHex) {
        this.numHex = numHex;
    }

    /**
     * @return the numOct
     */
    public String getNumOct() {
        return numOct;
    }

    /**
     * @param numOct the numOct to set
     */
    public void setNumOct(String numOct) {
        this.numOct = numOct;
    }

    /**
     * @return the numDec
     */
    public int getNumDec() {
        return numDec;
    }

    /**
     * @param numDec the numDec to set
     */
    public void setNumDec(int numDec) {
        this.numDec = numDec;
    }
}
